#!/usr/bin/env bash
docker rmi -f ptadmin/demo-nodejsweb 599885534814.dkr.ecr.us-east-2.amazonaws.com/demo-nodejsweb || echo "no image found!!!"

docker build . -t ptadmin/demo-nodejsweb && docker tag ptadmin/demo-nodejsweb:latest 599885534814.dkr.ecr.us-east-2.amazonaws.com/demo-nodejsweb:latest
$(aws ecr get-login --no-include-email --region us-east-2)
docker push 599885534814.dkr.ecr.us-east-2.amazonaws.com/demo-nodejsweb:latest

aws ecs update-service --cluster ptadmin-automation-ec2 --service nodejswebService2 --force-new-deployment